<div class="wrapper" [ngClass]="'avatar-' + size">
  <ng-container *ngIf="!isChannelAvatarNull() && !genericChannel">
    <a [routerLink]="[ '/video-channels', video.byVideoChannel ]" [title]="channelLinkTitle">
      <img [src]="video.videoChannelAvatarUrl" i18n-alt alt="Channel avatar" />
    </a>
    <a [routerLink]="[ '/accounts', video.byAccount ]" [title]="accountLinkTitle">
      <img [src]="video.accountAvatarUrl" i18n-alt alt="Account avatar" />
    </a>
  </ng-container>

  <ng-container *ngIf="!isChannelAvatarNull() && genericChannel">
    <a [routerLink]="[ '/accounts', video.byAccount ]" [title]="accountLinkTitle">
      <img [src]="video.accountAvatarUrl" i18n-alt alt="Account avatar" />
    </a>

    <a [routerLink]="[ '/video-channels', video.byVideoChannel ]" [title]="channelLinkTitle">
      <img [src]="video.videoChannelAvatarUrl" i18n-alt alt="Channel avatar" />
    </a>
  </ng-container>

  <ng-container *ngIf="isChannelAvatarNull()">
    <a [routerLink]="[ '/accounts', video.byAccount ]" [title]="accountLinkTitle">
      <img [src]="video.accountAvatarUrl" i18n-alt alt="Account avatar" />
    </a>
  </ng-container>
</div>
